package com.dzsw.javabase.proxy.cglib;

import com.dzsw.javabase.proxy.SubjectImpl;
import net.sf.cglib.proxy.Enhancer;

public class CglibProxyMain {

    public static void main(String[] args) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(SubjectImpl.class);
        enhancer.setCallback(new CglibProxy());
        SubjectImpl proxy = (SubjectImpl) enhancer.create();
        proxy.doSomething("susan");
    }
}
